#include<iostream>
using namespace std;

const int N=1e5+10;
int a[N];
int f[N];
int n,m;
int main(){
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		cin>>a[i];
		f[i]=a[i]-a[i-1];
	}
	while(m--){
		int l,r,k;
		cin>>l>>r>>k;
		f[l]+=k;
		f[r+1]-=k;
	}
	
	for(int p=1;p<=n;p++){
		a[p]=a[p-1]+f[p];
		cout<<a[p]<<" ";
	}
	return 0;
}
